package com.mairuide.datalog;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.mairuide._frame.base.BaseModel;

/**
 * 数据操作日志表
 * @author mh
 *
 */
@Entity
@Table(name="tb_data_operation_log")
public class DataOperationLog extends BaseModel{
	
	/**
	 * 日志id
	 */
	@Id
	@Column(name="id")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "data_operation_log")
	@SequenceGenerator(name = "data_operation_log", sequenceName = "SEQ_OPERATION_LOG",allocationSize=1)
	private int logId;
	
	/**
	 * 创建人id
	 */
	@Column(name="create_user_id")
	private int createUserId;
	
	/**
	 * 创建人姓名
	 */
	@Column(name="create_user_name")
	private String createUserName;
	
	/**
	 * 创建时间
	 */
	@Column(name="create_time")
	private Date createTime;
	
	/**
	 * 系统标识(0:开销户；1：运营管理平台)
	 */
	@Enumerated(EnumType.ORDINAL)
	@Column(name="system_flag")
	private SystemFlag systemFlag;
	
	/**
	 * 模块标识(0,"通道管理"), (,1,"企业管理"), (2,"用户管理");  
	 */
	@Enumerated(EnumType.ORDINAL)
	@Column(name="module_flag")
	private ModuleFlag moduleFlag;
	
	/**
	 * 修改数据beanid,或者其他唯一标识符
	 */
	@Column(name="bean_id")
	private String beanId;

	/**
	 * 导入文件数量
	 */
	@Column(name="file_quantity")
	private Integer fileQuantity;

	/**
	 * 操作类型(0:修改；1:新增；2:删除)
	 */
	@Enumerated(EnumType.ORDINAL)
	@Column(name="action_type")
	private ActionType actionType;
	
	/**
	 * 是否删除(0:未删除；1:已删除)默认未删除
	 */
	@Column(name="is_delete")
	private Integer isDelete = 0;

	/**
	 * 处理状态(0:未处理；1：已处理)
	 */
	@Column(name="DEAL_WITH")
	private Integer dealWith = 0;
	
	/**
	 * 操作原因
	 */
	@Column(name="OPERATION_REASON")
	private String operationReason;
	
	public int getLogId() {
		return logId;
	}

	public void setLogId(int logId) {
		this.logId = logId;
	}

	public int getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(int createUserId) {
		this.createUserId = createUserId;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public Integer getFileQuantity() {
		return fileQuantity;
	}

	public void setFileQuantity(Integer fileQuantity) {
		this.fileQuantity = fileQuantity;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public SystemFlag getSystemFlag() {
		return systemFlag;
	}

	public void setSystemFlag(SystemFlag systemFlag) {
		this.systemFlag = systemFlag;
	}

	public ModuleFlag getModuleFlag() {
		return moduleFlag;
	}

	public void setModuleFlag(ModuleFlag moduleFlag) {
		this.moduleFlag = moduleFlag;
	}

	public String getBeanId() {
		return beanId;
	}

	public void setBeanId(String beanId) {
		this.beanId = beanId;
	}

	public ActionType getActionType() {
		return actionType;
	}

	public void setActionType(ActionType actionType) {
		this.actionType = actionType;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}
	public Integer getDealWith() {
		return dealWith;
	}

	public void setDealWith(Integer dealWith) {
		this.dealWith = dealWith;
	}

	public String getOperationReason() {
		return operationReason;
	}

	public void setOperationReason(String operationReason) {
		this.operationReason = operationReason;
	}
}
